package com.wandian.action;

import java.io.IOException;

import com.wandian.robot.Robot;
import com.wandian.util.Log;

/**
 * @author long
 * @Create 2012-11-13 下午4:48:05
 * @QQ 108232706
 * @version 1.0
 * @description LoginAction
 */
public class LoginAction extends RobotAction {

	public LoginAction(Robot robot) {
		super(robot);
	}

	@Override
	public void run() {
		try {
			if (this.robot.connect()) {
				Log.debug("机器人连接服务端成功," + this.getRobot());
			} else {
				Log.debug("机器人正在连接服务端失败,无法连接socket," + this.getRobot().getUserId());
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
